FROM python:3.10-slim

WORKDIR /app

COPY . /app

# 使用清华源安装依赖
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt

# 使用 gunicorn 启动生产服务，输出访问与错误日志
CMD ["gunicorn", "-w", "1", "-b", "0.0.0.0:9002", "--access-logfile", "-", "--error-logfile", "-", "main:app"]